package br.com.winesys.geta.databinding.componentBinder;

import javax.swing.JSpinner;
import br.com.winesys.geta.databinding.ComponentBinder;

public final class JSpinnerBinder implements ComponentBinder<JSpinner> {

	private static final ComponentBinder<JSpinner> INSTANCE = new JSpinnerBinder();

	public static ComponentBinder<JSpinner> getInstance() {
		return INSTANCE;
	}

	private JSpinnerBinder() {
	}

	@Override
	public Object read(JSpinner component) {
		return component.getValue();
	}

	@Override
	public void write(JSpinner component, Object value) {
		component.setValue(value);
	}
}
